home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ASpEmu_NOROM.lha
/
ASpV076
/
Rexx
/
SaveSCR.asprx
< prev
Wrap
Text File
|
2000-10-20
|
1KB
|
41 lines
/* $VER: SaveSCR 1.1 */
/* Save the current display to a SCR file. */
OPTIONS RESULTS
GETVERSION /* ask which ASp version is running */
IF result<760 THEN DO /* minimum of V0.76 to use this script */
ADDRESS COMMAND 'requestchoice >nil: TITLE "ASp ARexx Error" BODY "Requires ASp V0.76 or newer!" GADGETS "OK"'
EXIT
END
/* A messy File Requester using the DOS C:RequestFile command.. */
ADDRESS COMMAND "RequestFile >T:ASpRequest PATTERN=#?.SCR SAVEMODE POSITIVE=Save"
OPEN(TMPFILE,'T:ASpRequest',R)
filename=STRIP(READLN(TMPFILE),B,'"')
CLOSE(TMPFILE)
IF OPEN(SCRFILE,filename,WRITE) THEN DO /* open the file */
GETPAGE /* which screen? */
p=RESULT
IF BITTST(D2C(p),3) THEN DO /* bit 3= scr buf */
SETPAGE 7 /* force shadow page in */
READRAM 49152 6912 /* read pic data */
filedata=result
SETPAGE p /* put paging back */
END
ELSE DO
READRAM 16384 6912 /* read pic from normal display */
filedata=result
END
WRITECH(SCRFILE,filedata) /* write it */
CLOSE(SCRFILE) /* tidy up behind us.. */
END